<template>
	<view class="sumNum">
		<view class="sub" @click="subNum">
			-
		</view>
		<view class="num">
			{{num}}
		</view>
		<view class="add" @click="addNum">
			+
		</view>
	</view>
</template>

<script>
	export default {
		props:['num'],
		data(){
			return {
				
			}
		},
		methods:{
			subNum(){
				this.$emit('sub')
			},
			addNum(){
				this.$emit('add')
			}
		}
	}
</script>

<style lang="less">
	.sumNum{
		display: flex;
		align-items: center;
		.sub{
			width: 60rpx;
			height: 45rpx;
			line-height: 45rpx;
			text-align: center;
			border: 1rpx solid #666666;
		}
		.num{
			margin: 0 30rpx;
			color: #333333;
			font-size: 12px;
		}
		.add{
			width: 60rpx;
			height: 45rpx;
			line-height: 45rpx;
			text-align: center;
			border: 1rpx solid #666666;
		}
	}
</style>
